package hczc.longcai.com.hccrowdfunding.views;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.EditText;

import hczc.longcai.com.hccrowdfunding.R;

/**
 * Created by Administrator on 2016/1/22.
 */
public class LoginEditText extends EditText {
    private Paint paint;

    public LoginEditText(Context context) {
        this(context, null);
    }

    public LoginEditText(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public LoginEditText(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        paint = new Paint();
    }


    @Override
    public void setCompoundDrawables(Drawable left, Drawable top, Drawable right, Drawable bottom) {
        Drawable drawable = getResources().getDrawable(R.mipmap.zhanghao_t);

        super.setCompoundDrawables(drawable, top, right, bottom);
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
//        Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.mipmap.zhanghao);
//        canvas.drawBitmap(bitmap,0,0,paint);
    }
}
